package com.woniuxy.receiver;

import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * @Author: 曾令忠
 * @Description:
 * @Date: 2020/7/7 0007-上午 10:16
 */
@Component
public class DeadLetterReceiver {
    @RabbitListener(queues = "deadLetterQueue")
    public void receive(Message message){
        System.out.println("死信消费者收到死信："+new String(message.getBody()));
    }
}
